Eject
Eject Eject a volume from its drive
#include <Files.h> File Manager
OSErr Eject( volName, vRefNum );
StringPtr volName ; address of Pascal-style name; NIL=use vRefNum
short vRefNum ; volume reference number
returns Error Code; 0=no error
Eject places a volume off-line (flushes it and releases its buffer memory)
then physically ejects the media from the drive.
volName is the address of a length-prefixed, pascal-style string containing
the name of the volume you wish to flush. If volName is NIL (0), the
vRefNum parameter is used.
vRefNum is the reference number of the volume you wish to flush. This
parameter is used only if volName is invalid or NIL.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
bdNamErr (-37) Bad name
extFSErr (-58) External file system
ioErr (-36) I/O error
nsDrvErr (-56) No such drive
nsvErr (-35) No such volume
paramErr (-50) No default volume

Notes: The volume remains mounted, and subsequent accesses of the ejected
volume will cause the File Manager to ask the the user to insert the ejected
disk.
Use UnmountVol before Eject if you won't need the disk again. Use
PBOffLine to place a volume off-line (freeing its volume buffer),
without actually ejecting the disk.